.wait, .wait * { cursor: wait !important; }

.cursor-progress, .cursor-progress * { cursor: progress !important; }


.opacity-transition(@speed)
{
    -moz-transition: opacity @speed ease;
    -webkit-transition: opacity @speed ease;
    -o-transition: opacity @speed ease;
    transition: opacity @speed ease;
}

.opacity-on-hover(@opacity)
{
    .opacity-transition(0.2s);
    opacity: 0.5;
    &:hover
    {

        opacity: 1;
    }
}

.tab-image(@url)
{
    background-image: url(@url);
    background-repeat: no-repeat;
    padding-left: 20px;
}

.image-button-without-text(@url)
{
    &:hover
    {
        cursor: pointer;
    }

    border: 0;
    height: 16px;
    width: 16px;

    background-color: transparent;
    background-image: url(@url);
    background-repeat: no-repeat;
    padding: 0;
    position: relative;

    span
    {
        visibility: hidden;
    }

    &:active
    {
        top: 1px; left: 1px;
    }
}

.image-button-with-text(@url, @top: 0px)
{
    &:hover
    {
        cursor: pointer;
    }


    border: 0;
    height: 16px;

    font-family: Tahoma, sans-serif;
    background-color: transparent;
    background-image: url(@url);
    background-repeat: no-repeat;
    padding: 0;
    position: relative;
    top: @top;

    span
    {
        padding-left: 16px;
        text-decoration: underline;
    }

    &:active
    {
        top: @top + 1; left: 1px;
    }
}

table.pgui-admin-content
{
    width: 100%;

    tbody > tr > td.page-list-column
    {
        width: 200px;
    }

}

div.pg-admin-container
{
    padding: 10px 20px;

    h2.page_header
    {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    div.admin-tabs
    {
        li.users a span
        {
            .tab-image('images/user.png')
        }

        li.roles a span
        {
            .tab-image('images/role.png')
        }
    }
    
    ul.tabs
    {
        height: 30px;
        border-bottom: 1px solid #666;
    }

    ul.tabs li {
        float: left;
        list-style-type: none;
        margin: 0 10px 0 0;
    }

    ul.tabs a {
        float: left;
        display: block;
        padding: 5px 30px;
        height: 18px;
        margin-right: 2px;
        position: relative;
        top: 1px;
        outline: 0;

        font-size: 1.1em;
        font-weight: bold;
        text-decoration: none;

        background-color: #efefef;
        color: #777;
        border:1px solid #666;
        border-bottom: 0;
        
        -webkit-border-radius: 4px 4px 0 0;
        -moz-border-radius: 4px 4px 0 0;
        border-radius: 4px 4px 0 0;
    }

    ul.tabs a:hover
    {
        background-color:#F7F7F7;
        color:#333;
    }

    ul.tabs a.current {
        background-color: #f8f8f8;
        border-bottom:  1px solid #f8f8f8;
        color:  #000;
        cursor: default;
        -webkit-box-shadow: 3px 3px 5px #888;
        -moz-box-shadow: 3px 3px 5px #888;
        box-shadow: 3px 3px 5px #888;
        z-index: 0;
    }

    table.top-level-table
    {
        margin: 8px;
        border-collapse: collapse;

        > thead > tr > th
        {
            padding: 4px 20px;
            border: 0;
            border-bottom: 1px solid #000;
        }

        > tbody > tr > td
        {
            padding: 8px 2px;
            border: 0;
            border-bottom: 1px solid #ccc;
        }
    }

    div.panes
    {
        position: relative;
        z-index: 0;

        -webkit-box-shadow: 8px 5px 5px -5px #888;
        -moz-box-shadow: 8px 5px 5px -5px #888;
        box-shadow: 8px 5px 5px -5px #888;

        background-color: #f8f8f8;
        border-left: 1px solid #666;
        border-bottom: 1px solid #666;
        border-right: 1px solid #666;
    }

    div.admin-users
    {
        button.delete-user
        {
            .image-button-with-text('images/user_delete.png');
            .opacity-on-hover(0.5);
        }

        button.edit-user
        {
            .image-button-with-text('images/user_edit.png');
            .opacity-on-hover(0.5);
        }

        button.change-user-password
        {
            .image-button-with-text('images/password_edit.png');
            .opacity-on-hover(0.5);
        }
    }

    div.admin-users
    {
        table.users
        {
            tr
            {
                overflow: visible;
            }

            > tbody > tr > td
            {
                border: 0;
            }

            > tbody > tr.delimiter > td
            {
                height: 1px;
                padding: 0;
                border-bottom: 1px solid #ccc;
            }

            td.actions
            {
                //width: 320px;
            }

            td.user-name
            {
                padding-left: 10px;
                width: 410px;
            }

            td.show-user-grants
            {
                padding: 0;
                width: 130px;
                overflow: visible;
                z-index: 1;
            }

            td.grants-row
            {
                padding: 0;
                padding-bottom: 4px;
            }
        }

        div.show-user-grants
        {
            border: 0;
            position: relative;
            height: 22px;

            padding: 0;

            &.expanded
            {
                -webkit-box-shadow: 3px 3px 5px #888;
                -moz-box-shadow: 3px 3px 5px #888;
                box-shadow: 3px 3px 5px #888;
                -webkit-border-radius: 4px 4px 0 0;
                -moz-border-radius: 4px 4px 0 0;
                border-radius: 4px 4px 0 0;

                background-color: #f0f0f0;
                height: 28px;
                bottom: -2px;
                overflow: visible;
                border: 1px solid #000;
                border-bottom: 0;
            }

            button.show-user-grants
            {
                .image-button-with-text('images/grants.png', 3px);
                .opacity-on-hover(0.5);
                background-position: 10px 0px;
                width: 100%;
            }
            
            z-index: 1;
        }

        div.grants-container
        {
            padding: 8px;
            z-index: 1;
            position: relative;
            background-color: #f0f0f0;
            border: 1px solid #000;
            //border-top: 0;
            -webkit-box-shadow: 8px 5px 5px -5px #888;
            -moz-box-shadow: 8px 5px 5px -5px #888;
            box-shadow: 8px 5px 5px -5px #888;
            width: 606px;

            div.loading-panel
            {
                background-image: url('images/grants-loader.gif');
                background-position: center 22px;
                background-repeat: no-repeat;
                height: 100px;

                div
                {
                    position: relative;
                    text-align: center;
                    top: 60px;
                    font-weight: bold;
                    padding-left: 12px;
                }
            }

            table
            {
                border-collapse: collapse;
                width: 606px;

                tbody tr:first-child {
                    border-bottom: 2px solid #000;
                }

                tr > th, tr > td
                {
                    padding-top: 4px;
                    padding-bottom: 4px;
                }

                tr > td
                {
                    border-top: 1px solid #ddd;
                }

                td + td + td, th + th + th
                {
                    border-left: 1px solid #ddd;
                }

                td.page-caption
                {
                    width: 200px;
                }

                td.page-grant
                {
                    text-align: center;
                }
            }
        }
    }

    div.actions
    {
        padding: 8px;

        button
        {
            margin: 0 8px;
        }

        button.add-user
        {
            .image-button-with-text('images/user_add.png');
        }

        button.expand-all
        {
            .image-button-with-text('images/expand_all.png');
        }

        button.collapse-all
        {
            .image-button-with-text('images/collapse_all.png');
        }
    }

}

div.pgui-form
{
    div.comment
    {
        padding: 10px 0;
    }

    table.fieldset-container
    {
        border-collapse: collapse;

        label
        {
            font-weight: bold;
        }

        td
        {
            padding: 5px 10px;
        }
    }

    div.checkbox-group
    {
        div.checkbox-container
        {
            margin: 8px 0;
        }
    }

    input
    {
        padding: 2px;
    }
}